package c.com.simple.learning.redis.util;

import org.redisson.Redisson;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;

import java.util.concurrent.TimeUnit;

/**
 * @author Jianxing.Jia
 * @date 2022/5/26
 * @description 描述信息
 */
public class RedisUtil {

    public static void main(String[] args) {
        RedissonClient redissonClient = Redisson.create();
        RLock lock = redissonClient.getLock("lock");
        lock.lock(30_000L, TimeUnit.SECONDS);

        lock.unlock();
    }

}
